<!--title-->
<div class="mnav1">
	<div class="m_nav">
		<div class="nav_left">
			<em class="home_icon"><?=$this->sys_name?></em><span>&nbsp;&gt;&nbsp;</span><font><?=$this->title?></font>
		</div>
	</div>
</div>

<div class="content-table">
<div class="content-table-title"><?=$this->title?></div>
<br />
<?php if($this->msg):?>
<div class="replace"><?=$this->msg?></div>
<br />
<?php endif;?>
<form action="/dcc/companies" name="form1" method="GET">
店铺名称：<input type="text" name="keyword" <?php if($this->keyword){echo "value='".$this->keyword."'";}?> />
&nbsp;&nbsp;&nbsp;&nbsp;
负责运营：<input type="text" name="staff_name" <?php if($this->staff_name){echo "value='".$this->staff_name."'";}?> />
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="submit" class="button" value="搜索" />
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="button" class="button-cancle" value="清空搜索条件" onclick="location.href='?';" />
&nbsp;&nbsp;&nbsp;&nbsp;
<font color="red"><b>当前搜索结果: 店铺数 <?=$this->data['ct']?></b></font>
&nbsp;&nbsp;&nbsp;&nbsp;
<a href="/dcc/companies-add"><font color="green"><b>【创建店铺】</b></font></a>
</form>
<br />
    <table>
        <tr>
            <th>店铺名称</th>
            <th>充值剩余分钟</th>
            <th>赠送分钟时长</th>
            <th>运营状态</th>
            <th>坐席量</th>
            <th>通话时长</th>
            <th>呼出通话时长</th>
            <th>呼入通话时长</th>
            <th>已消耗分钟</th>
            <th>负责运营</th>
            <th width="300">操作</th>
        </tr>
        <?php $data = $this->data['current_page_info'];?>
        <?php if($data["company_name"]):?>
            <?php foreach($data["company_name"] as $id => $something):?>
                <tr>
                    <td><font color="<?php echo $data['czht_dealer_id'][$id]?'':'red'?>"><?=$data["company_name"][$id]?></font></td>
                    <td><?=$data["balance1"][$id]?>分钟</td>
                    <td><?=$data["balance2"][$id]?>分钟</td>
                    <td><?=$data["status"][$id]?"<font color='green'>运营中</font>":"<font color='red'>已关店</font>"?></td>
                    <td><?=$data["total_users"][$id]?></td>
                    <td><?=($data["history_call_out_mins"][$id]+$data["history_call_in_mins"][$id])?>分钟</td>
                    <td><?=$data["history_call_out_mins"][$id]?>分钟</td>
                    <td><?=$data["history_call_in_mins"][$id]?>分钟</td>
                    <td><?=$data["history_fee"][$id]?>分钟</td>
                    <td><?=$data["staff_name"][$id]?></td>
                    <td>
                        <button type="button" onclick="window.location.href='/dcc/call-history/company_id/<?=$id?>'">查看通话</button>&nbsp;&nbsp;&nbsp;
                        <button type="button" onclick="window.location.href='/dcc/companies-edit/company_id/<?=$id?>'">编辑</button>&nbsp;&nbsp;&nbsp;
                        <button type="button" onclick="window.location.href='/dcc/companies-user/company_id/<?=$id?>'">坐席管理</button>&nbsp;&nbsp;&nbsp;
                        <button type="button" onclick="window.location.href='/dcc/companies-balance/company_id/<?=$id?>'">充值</button>
                    </td>
                </tr>
            <?php endforeach;?>
        <?php endif;?>
    </table>
<br /><br />
<div align="right"><?=$this->pagination?></div>
<br /><br /><br />
